import { createWebHashHistory, createRouter } from 'vue-router';



// 优化性能：懒加载路由（用的时候在加载）
// import Login from '../view/Login/index.vue';
// import Layout from '../view/Layout/index.vue';
// import Dashboard from '../view/Home/Dashboard/index.vue';
// import Banner from '../view/Home/Banner/index.vue';
// import AboutIndex from "../view/About/Index/index.vue";
// import Aaa from "../view/About/aaa/index.vue";

const Login = () => import("../view/Login");
const NotFound = () => import("../view/NotFound/404");

import homeRoute from './home';
import aboutRoute from './about';




const routes = [
  // 重定向
  {path:"/",redirect: "/login",hidden:true},
  { path: '/login', component: Login ,name:"login",hidden:true},
  // { path: '/layout', component: Layout,name:"layout",hidden:true},
  homeRoute,
  aboutRoute,
  { path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound },

];
// export { routes };

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});
export default router;